package simply.learn.hibernate.learn.example1;

import java.util.Date;
import org.hibernate.Session;
import org.hibernate.SessionFactory;


public class Example1 {

	public static void main(String[] args) {
		Student sridhar = new Student("Sridhar",new Date(),"Namakkal"); 
		SessionFactory sessionFactory = SingletonSessionFactory.getSessionFactory();
		Session session = sessionFactory.openSession();
		session.beginTransaction();
		session.save(sridhar);
		session.getTransaction().commit();
	}

}
